package com.lagou;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;

/**
 * @description: DubboServiceImpl
 * @author: cxz
 * @date: 2020/7/23 16:15
 * @version: v1.0
 */
@Service
public class DubboServiceImpl implements DubboApiService{
    @Autowired
    JavaMailSender javaMailSender;
    @Value("${spring.mail.username}")
    private String from;
    @Override
    public String sendEmail(String email, String code) {
       /* SimpleMailMessage simpleMailMessage = new SimpleMailMessage();
        simpleMailMessage.setFrom(from);
        simpleMailMessage.setTo(email);
        simpleMailMessage.setSubject("验证码");
        simpleMailMessage.setText(code + "");
        javaMailSender.send(simpleMailMessage);*/
        return "success";
    }
}
